﻿<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/Include/Admin.master"
    AutoEventWireup="true" CodeFile="ManageArea.aspx.cs" Inherits="Admin_City_ManageArea" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="../../Style/DatePage.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="text-align: center">
        <table cellspacing="0" cellpadding="0" style="width: 100%; height: 30px; padding-bottom: 5px;
            border: 1px; border-color: #66CCFF;">
            <tr style="background-image: url('/images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
                <td style="font-weight: bold; font-size: large; font-family: 仿宋;">
                    <strong class="style1">区域添加</strong>
                </td>
            </tr>
        </table>
        <asp:Literal ID="litMessage" runat="server"></asp:Literal>
        <table style="width: 100%; margin-bottom: 0px;" class="editTable">
            <tr>
                <th class="style3">
                    所属市
                </th>
                <td>
                    <asp:Label ID="labShi" runat="server" Text="Label"></asp:Label>
                </td>
                <th class="style3">
                    <span class="red">*</span>区域名称
                </th>
                <td>
                    <asp:TextBox ID="txtQuYu" runat="server" Height="20px" Width="200px" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <asp:Button ID="btnSubmit" runat="server" Text="提交" Height="20px" Width="50px" OnClick="btnSubmit_Click" />
                </td>
            </tr>
        </table>
        <table style="width: 100%; margin-bottom: 0px;" class="editTable">
            <tr>
                <td align="center" colspan="4">
                    <asp:ListView ID="lv_QuYuList" runat="server" DataKeyNames="ID" OnItemCanceling="lv_QuYuList_ItemCanceling"
                        OnItemDeleting="lv_QuYuList_ItemDeleting" OnItemEditing="lv_QuYuList_ItemEditing"
                        OnItemUpdating="lv_QuYuList_ItemUpdating" OnPagePropertiesChanged="lv_QuYuList_PagePropertiesChanged">
                        <LayoutTemplate>
                            <table width="100%" class="editTable" cellspacing="1">
                                <th>
                                    所属市
                                </th>
                                <th>
                                    区域名称
                                </th>
                                <th>
                                    操作
                                </th>
                                <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                            </table>
                        </LayoutTemplate>
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <%#ReturnCityName(Eval("CityID"))%>
                                </td>
                                <td>
                                    <%#Eval("Name")%>
                                </td>
                                <td>
                                    <asp:LinkButton ID="lbtnEdit" runat="server" CommandName="Edit" Text="修改"></asp:LinkButton>&nbsp;&nbsp;
                                    <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('您是否确定删除?');"
                                        CommandName="Delete" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <tr>
                                <td>
                                    <%#ReturnCityName(Eval("CityID"))%>
                                </td>
                                <td>
                                    <asp:TextBox ID="txtEditTitle" runat="server" Text='<%#Eval("Name")%>'></asp:TextBox>
                                </td>
                                <td style="width: 130px">
                                    <asp:LinkButton ID="lbtnCancel" runat="server" Text="取消" CommandName="Cancel"></asp:LinkButton>&nbsp;&nbsp;
                                    <asp:LinkButton ID="lbtnUpdate" runat="server" Text="更新" CommandName="Update"></asp:LinkButton>
                                </td>
                            </tr>
                        </EditItemTemplate>
                    </asp:ListView>
                    <div style="padding: 4px; text-align: center;">
                        <asp:DataPager ID="Pager" runat="server" PagedControlID="lv_QuYuList" OnPreRender="Pager_PreRender"
                            PageSize="20">
                            <Fields>
                                <asp:NumericPagerField ButtonCount="10" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                                <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="true"
                                    ShowFirstPageButton="true" />
                                <asp:TemplatePagerField>
                                    <PagerTemplate>
                                        共<%=Pager.TotalRowCount%>条
                                    </PagerTemplate>
                                </asp:TemplatePagerField>
                            </Fields>
                        </asp:DataPager>
                    </div>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
